package com.example.blog.controller;

import com.example.blog.entity.Flink;
import com.example.blog.mapper.FlinkMapper;
import com.example.blog.service.impl.FlinkServiceImpl;
import com.yc.common.vo.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 刘扬新
 * @since 2023-06-27
 */
@RestController
@RequestMapping("/blog/flink")
public class FlinkController {

    @Resource
    FlinkServiceImpl flinkService;

    @RequestMapping("selectLinks")
    public Result selectLinks(){
        if (flinkService.selectLinks() != null) {
            List<Flink> flinks = flinkService.selectLinks();
            return Result.success("查询成功",flinks);
        }
        return Result.failure("查询失败");
    }
}
